package vn.bus.service;

import java.util.ArrayList;

import com.google.gson.Gson;

import vn.bus.models.RouteManager;
import vn.bus.dto.RouteDTO;

public class RouteService {

	public String getAllRoutes() {
		String rs = null;
		try {
			ArrayList<RouteDTO> allRoutes = null;
			RouteManager routeManager = new RouteManager();
			allRoutes = routeManager.getAllRoutes();
			Gson gson = new Gson();
			/*System.out.println("RouteService - method : getAllRoutes : "
					+ gson.toJson(allRoutes));*/
			rs = gson.toJson(allRoutes);

		} catch (Exception e) {
			System.out.println("error");
		}
		return rs;
	}
}
